﻿using System.Collections.Generic;
using Iesi.Collections;

namespace Lyh.Core.Domain
{
    public abstract class TreeStore<T> : BaseObject
    {
        private string id = string.Empty;
        private string text = string.Empty;
        private string iconCls = string.Empty;
        private IList<T> children = new List<T>();
        private int level = 1;
        private bool leaf = true;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        public string IconCls
        {
            get { return iconCls; }
            set { iconCls = value; }
        }

        public bool Leaf
        {
            get { return leaf; }
            set { leaf = value; }
        }

        public virtual IList<T> Children
        {
            get { return children; }
            set { children = value; }
        }

        public virtual int Level
        {
            get { return level; }
            set { level = value; }
        }
    }
}